import request from '@/util/request'
const api_name = `/api/order/orderInfo`

export default {
  // 预约下单
  submitOrder(scheduleId, patientId) {
    return request({
      url: `${api_name}/auth/submitOrder/${scheduleId}/${patientId}`,
      method: 'post'
    })
  },
  // 查询订单
  getOrderPageList(page,limit,searchObj){
    return request({
      url: `${api_name}/auth/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },
  // 获取订单状态状态
  getStatusList(){
    return request({
      url: `${api_name}/auth/getStatusList`,
      method: 'get'
    })
  },
  // 获取订单详情
  getOrderInfo(orderId){
    return request({
      url: `${api_name}/auth/getOrder/${orderId}`,
      method: 'get'
    })
  },
  cancelOrder(orderId) {
    return request({
      url: `/api/order/orderInfo/auth/cancelOrder/${orderId}`,
      method: 'get'
    })
  },
}
